<template>
  <div class="city">
    <div class="alpahbet">
      <ul class="list">
        <li v-for="(item,key) in city" :key="key"
        @click="handleLetter">{{key}}</li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  name: 'cityAlpahbet',
  props: {
    city: Object
  },
  methods: {
    handleLetter (e) {
      this.$emit('change', e.target.innerText)
    }
  }
}
</script>

<style lang="scss">
@import '~@/assets/css/vertauls.scss';
.city {
  .alpahbet {
    .list {
      position: absolute;
      right: 0;
    left: 720px;
      top: 50%;
      transform: translateY(-30%);
      width: 30px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: $bgColor;
      li {
        font-size: 18px;
      }
    }
  }
}
</style>
